<template>
  <div>
     <div class="conten">
          <div class="title">
          <i class="iconfont icon-feiji1"></i> <span>详情页面</span>
      </div>
     </div>

     <div class="main">
       <h1>{{agents.name}}</h1>
       <div class="info">

       <img :src="agents.image" alt="">
       <p> <span>详情介绍:</span>{{agents.desc}}
       </p>
       </div>
       <div class="map"></div>
     </div>
  </div>
</template>

<script>
import  { getAgentsById } from '@/api/agents'
export default {
  data(){
return{
  agents:[]
}
  },
async  created(){
  const {data} = await getAgentsById(this.$route.query.id)
  this.agents = data
  }

}
</script>

<style lang="less" scoped>
@import url("https://at.alicdn.com/t/font_2904905_z3gg3pnwtwo.css");
.conten{
    width: 60%;
    margin: 20px auto;
}
.conten .title{
    color: #eeaf46;
}
.main{
  width: 60%;
  height: auto;
  margin: 10px auto;
  padding: 10px;
  background-color: #e1c59c;
  border-radius: 10px;
  .info{
    display: flex;
  }
  h1{
    color: #fff;
    line-height: 1.5;

    text-align: center;
  }
  img{
    width:50%;
    height: auto;
    object-fit: cover  ;
  }
  p{
    margin-left: 10px;
    color: #555;
    font-size: 14px;
    line-height: 1.2;
    span{
      color: #eeaf46;
    }
  }
}
</style>